#include "AboutDialog.h"
#include "ui_AboutDialog.h"

AboutDialog::AboutDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AboutDialog)
{
    ui->setupUi(this);

    QString fontStyle = QString("font: %1pt \"%2\";")
                        .arg(qApp->font().pointSize())
                        .arg(qApp->font().family());
    ui->lblHomepage->setStyleSheet(fontStyle);
    ui->lblLicense->setStyleSheet(fontStyle);
    ui->lblVersion->setText(qApp->applicationVersion());
    ui->lblQtVersion->setText(QString(qVersion()));
}

AboutDialog::~AboutDialog()
{
    delete ui;
}

void AboutDialog::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}
